<!-- richText_frm.html -->
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta name="format-detection" content="address=no" />
    <meta name="format-detection" content="date=no" />
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>绿色</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/swiper.min.css">
    <link rel="stylesheet" type="text/css" href="../css/data-flex.min.css">
    <style>
        body {
            background-color: #fff;
        }

        [v-clock] {
            display: none;
        }

        .rich-text img,
        .rich-text video {
            max-width: 100% !important;
            height: auto;
        }
    </style>
</head>

<body>
    <div class="vueApp" v-clock>
        <div v-if="content !=''" style="padding: 16px; font-size: 14px;text-align: justify;word-break: break-all;">
            <div class="rich-text" v-html="content"></div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/service/service-tool.js"></script>
<script type="text/javascript" src="../script/service/service-app.js"></script>
<script type="text/javascript" src="../script/service/service-user.js"></script>
<script type="text/javascript" src="../script/service/service-logic.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/vue.min.js"></script>
<script type="text/javascript">
    var USER, $S, vm;
    apiready = function () {
        $S = SERVICE();
        USER = USER();
        console.log(JSON.stringify(api.pageParam) + '=====pageParam');
        fnInit();
    };

    function fnInit() {
        vm = new Vue({
            el: ".vueApp",
            data: {
                content: ''
            }
        })
        vm.content = formatHtml(api.pageParam.content);
        if(vm.content.length == 0) {
            getData();
        }
    }

    function getData() {
        var textType = api.pageParam.textType;
        var params = {
            'entityName': 'systemSetup',
            'textType': textType
        };
        var url = 'common/findList';
        var callback = function (data) {
            vm.content = formatHtml(data.textField);
        };
        POST(url, params, callback);
    }
</script>

</html>